<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>三个数的最大乘积</title>
</head>
<body>
  <script>
    const nums = [1, 2, 3, 4, 5, 0]
    const n = nums.length;
    // 将数组进行排序，以防获取比较大的数不在最后面
    nums.sort((a, b) => a - b)
    // console.log(arr.sort((a, b) => a - b))
    var res = nums[n - 1] * nums[n - 2] * nums[n - 3]
    console.log(res)
  </script>
</body>
</html>